<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>后台管理 - 易买网</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>
    <script type="text/javascript" src="/scripts/function-manage.js"></script>
</head>

<body>
<%@ include file="/WEB-INF/manage/common/head.jsp" %>
<%@ include file="/WEB-INF/manage/common/position.jsp"%>
<div id="main" class="wrap">
    <%@ include file="/WEB-INF/manage/common/left.jsp" %>
    <div class="main">
        <h2>修改分类</h2>
        <div class="manage">
            <form action="/product/category/update" method="post">
                <input type="hidden" name="id" value="${productCategory.id}">
                <table class="form">
                    <tr>
                        <td class="field">父分类：</td>
                        <td>
                            <select name="parentId">
                                <c:forEach items="${productCategories}" var="productCategoryParent">
                                    <c:if test="${productCategory.parentId != productCategoryParent.id}">
                                        <option value="${productCategoryParent.id}">${productCategoryParent.name}</option>
                                    </c:if>
                                    <c:if test="${productCategory.parentId == productCategoryParent.id}">
                                        <option selected="selected"
                                                value="${productCategoryParent.id}">${productCategoryParent.name}</option>
                                    </c:if>
                                </c:forEach>
                                <option value="0">根栏目</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="field">分类名称：</td>
                        <td><input type="text" class="text" name="name" value="${productCategory.name}"/></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><label class="ui-blue"><input type="submit" name="submit" value="更新"/></label></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="clear"></div>
</div>
<%@ include file="/WEB-INF/common/footer.jsp"%>
</body>
</html>
